package com.tianshuo.transcation.service;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;
import org.springframework.transaction.annotation.Propagation;
import org.springframework.transaction.annotation.Transactional;

@Component
public class TransactionService {


    @Autowired
    TransactionServiceB transcationServiceB;



    @Transactional(propagation = Propagation.REQUIRED)
    public void a() {

        int a = 1+1;
        transcationServiceB.b();
    }


}
